package com.iotechn.unimall.admin.api.treeDetails;
import com.iotechn.unimall.core.annotation.HttpMethod;
import com.iotechn.unimall.core.annotation.HttpOpenApi;
import com.iotechn.unimall.core.annotation.HttpParam;
import com.iotechn.unimall.core.annotation.HttpParamType;
import com.iotechn.unimall.core.annotation.param.NotNull;
import com.iotechn.unimall.core.exception.ServiceException;
import com.iotechn.unimall.data.domain.TreeDetailsDO;
import com.iotechn.unimall.data.model.Page;

/**
 * 租赁果树管理
 *
 * @author hct
 * @email 77802226@qq.com
 * @date 2020-07-20 21:01:04
 */
@HttpOpenApi(group = "admin.treeDetails", description = "")
public interface AdminTreeDetailsService {

    @HttpMethod(description = "列表", permission = "list", permissionParentName = "果树管理", permissionName = "果树管理")
    Page<TreeDetailsDO> list(
            @HttpParam(name = "pageNo", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer page,
            @HttpParam(name = "limit", type = HttpParamType.COMMON, description = "页长度", valueDef = "20") Integer limit,
            @HttpParam(name = "landNo", type = HttpParamType.COMMON, description = "土地编号") String landNo,
            @HttpParam(name = "treeId", type = HttpParamType.COMMON, description = "") Integer treeId,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "创建", permission = "operation:treeDetails:create", permissionParentName = "果树管理", permissionName = "果树管理")
    TreeDetailsDO create(
            @NotNull @HttpParam(name = "treeDetailsDO", type = HttpParamType.COMMON, description = "") TreeDetailsDO treeDetailsDO,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "修改", permission = "operation:treeDetails:update", permissionParentName = "果树管理", permissionName = "果树管理")
    String update(
            @NotNull @HttpParam(name = "treeDetailsDO", type = HttpParamType.COMMON, description = "") TreeDetailsDO treeDetailsDO,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "删除", permission = "operation:treeDetails:delete", permissionParentName = "果树管理", permissionName = "果树管理")
    String delete(
            @NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "删除Id") Long id,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "详情", permission = "operation:treeDetails:detail", permissionParentName = "果树管理", permissionName = "果树管理")
    TreeDetailsDO detail(
            @NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "Id") Long id,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "批量删除", permission = "operation:treeDetails:batchdelete", permissionParentName = "果树管理", permissionName = "果树管理")
    String batchDelete(
            @NotNull @HttpParam(name = "ids", type = HttpParamType.COMMON, description = "土地Id") String ids,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员Id") Long adminId) throws ServiceException;

}

